//
//  LYEArtistHeaderViewController.m
//  artist
//
//  Created by Jay_Apple on 16/3/2.
//  Copyright © 2016年 viviyoo. All rights reserved.
//

#import "LYEArtistHeaderViewController.h"
#import "LYDiscoverViewController.h"
#import "LYTestGuideViewController.h"
#import "LYTeacherViewController.h"
#import "LYOrzViewController.h"
#import "LYSubCategotyViewController.h"
#import "LYLocalClassViewController.h"
#import "LYHotVideoViewController.h"
#import "LYBannerModelModel.h"
#import "XMGInfiniteScrollView.h"
#import "LYTestListViewController.h"

@interface LYEArtistHeaderViewController ()

@property (nonatomic, strong) NSArray *models;
@property (weak, nonatomic) IBOutlet XMGInfiniteScrollView *bannerViews;

@end

@implementation LYEArtistHeaderViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self getBanner];
}


#pragma mark - 网络请求

- (void)getBanner{

    [LYRequestTool getSlideImageWithToken:LYToken slide_type:LYSlideTypeErtist success:^(NSArray<LYBannerModelModel *> *models) {
        
        
        self.models = models;
        
    } failure:^(NSString *code, NSString *message) {
        
    }];

}

#pragma mark - 重写方法
- (void)setModels:(NSArray *)models{

    _models = models;
    
    self.bannerViews.models = _models;

}

#pragma mark - 按钮点击
/**
 *  topBarBtn
 */
- (IBAction)topBarBtnOnclick:(UIButton *)sender {
    
     NSArray *subject_Ids = @[@"26", @"32", @"16", @"45", @"1"];
    
    LYSubCategotyViewController *subjectVC = [[LYSubCategotyViewController alloc] init];
    subjectVC.subject_id = subject_Ids[sender.tag];
    subjectVC.navigationItem.title = [sender.titleLabel.text stringByAppendingString:@"课程"];
    
    [self.navigationController pushViewController:subjectVC animated:YES];
}



/**
 *  艺考指南
 */
- (IBAction)guideBtnOnclick:(id)sender {
    
    LYTestGuideViewController *guideVC = [[LYTestGuideViewController alloc] init];
    guideVC.navigationItem.title = @"艺考指南";
    [self.navigationController pushViewController:guideVC animated:YES];
    
}

/**
 *  周边老师
 */
- (IBAction)teacherBtnOnclick:(id)sender {
    
    LYTeacherViewController *teacherVC = [[LYTeacherViewController alloc] init];
    [self.navigationController pushViewController:teacherVC animated:YES];
}

/**
 *  周边机构
 */
- (IBAction)orzBtnOnclick:(id)sender {
    
    LYOrzViewController *orzVC = [[LYOrzViewController alloc] init];
    [self.navigationController pushViewController:orzVC animated:YES];
}

/**
 *  本地课程
 */
- (IBAction)classBtnOnclick:(id)sender {
    
    LYLocalClassViewController *classVC = [[LYLocalClassViewController alloc] init];
    [self.navigationController pushViewController:classVC animated:YES];
}

/**
 *  热门视频
 */
- (IBAction)videoBtnOnclick:(id)sender {
    
    LYHotVideoViewController *vidoVC = [[LYHotVideoViewController alloc] init];
    [self.navigationController pushViewController:vidoVC animated:YES];
}

/**
 *  在线测试
 */
- (IBAction)testBtnOnclick:(id)sender {
    LYTestListViewController * testVC = [[LYTestListViewController alloc] init];
    testVC.navigationItem.title = @"在线测试";
    [self.navigationController pushViewController:testVC animated:YES];
    
}


@end
